<template>
  <div>

  <catshit-header active-index="4"></catshit-header>
    <el-card>
      <el-table
        :data="myMovie"
        stripe
        style="margin-top: 35px;width: 50%;margin-left:25%">
        <el-table-column prop="user_id" label="用户名"></el-table-column>
        <el-table-column prop="movieName" label="电影名"></el-table-column>
        <el-table-column prop="time" label="购买时间"></el-table-column>
        <el-table-column prop="price" label="价格"></el-table-column>
        <el-table-column>
          <el-button type="primary">评价</el-button>
        </el-table-column>
        <el-table-column >
          <el-button>详情</el-button>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
export default {
  name: "myPurchase",
  data(){
    return{
      myMovie:[
        {
          user_id:"1",
          movieName:"123",
          time:"购买时间",
          price: "80"
        },{
          user_id:"2",
          movieName:"123",
          time:"购买时间",
          price: "80"
        }
      ]
    }
  },
  mounted() {
    this.init()
  },
  methods:{
    async init(){
      this.$axios.post('film/film/get-ticket-buy-record').then((res)=>{
        if(res.data.code===0){
          this.myMovie=res.data.myMovie
        }
        else {
          alert("错误")
        }
      })
    }
  }

}
</script>

<style scoped>

</style>
